home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 47.7z / BS1 part 47 / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].7z / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].adf / piarc.lzh.parta / Degas.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-17  |  2KB  |  80 lines

  1. /*
  2.  * DGS.rexx   -  Degas (Atari) file loader
  3.  *               Loads Degas, Degas Elit And Degas Compressed
  4.  *                *.PI1
  5.  *                *.PI2
  6.  *                *.PI3
  7.  *                *.PC1
  8.  *                *.PC2
  9.  *                *.PC3
  10.  *
  11.  *  Written by: Pete Patterson
  12.  * Last Update: Sept. 3, 1993
  13.  *    Revision: 1.00
  14.  *         For: Black Belt Systems image processing series IM, IM F/c, and IP.
  15.  * ---------------------------------------------------------------------------
  16.  *    Revision: 1.00 - see ReadMe file for details on changes to this level
  17.  *
  18.  *        1.00  03 Sept. 1993  (BC)
  19.  */
  20.  
  21. /*
  22.  * open rexxsupport.library -- needed for some functions
  23.  */
  24. if ~show('L',"rexxsupport.library") then do
  25.   if addlib('rexxsupport.library',0,-30,0) then do
  26.       /* everything's ok */
  27.     end;
  28.   else do
  29.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  30.     say 'Cannot operate  without this library - sorry!';
  31.     exit 10;
  32.     end;
  33.   end;
  34.  
  35.  
  36.   /*
  37.    * This code attempts to read a file called "picmdpath" from REXX:
  38.    * If it can't find it, the script will assume that the commands
  39.    * associated with this PI Module are in "c:". If the file exists,
  40.    * the script will look in the path that is specified in the file.
  41.    * If you create this file, you MUST put a complete, correct path
  42.    * in it; if the commands are in a sub-directory, you have to put
  43.    * the trailing slash on the path (like, device:dir/).
  44.    * 
  45.    */
  46.   cmdpath = 'c:';
  47.   if open(fhandle,'rexx:picmdpath','read') then  /* open the file */
  48.     do
  49.       cmdpath = readln(fhandle);
  50.       call close(fhandle);  /* close the file    */
  51.     end
  52.  
  53. prtnme = 'IM_Port';
  54. address(prtnme);
  55.  
  56. path = 'ram:';
  57. name = '';
  58. ext  = '';
  59.  
  60.   options results;
  61.   'filerequest "'||path||'","'||name||'","'||ext||'","Load Degas"';
  62.   dgsfile = result;
  63.   options;
  64.  
  65.   if dgsfile = 'FR_CANCELLED' then do
  66.     address(prtnme);
  67.     'imtofront';
  68.     exit 0;
  69.     end;
  70.  
  71.   address(prtnme);
  72.   options results;
  73.   'jackin';
  74.   jackadr = result;
  75.   options;
  76.  
  77.   address command cmdpath||'degas '||jackadr||' 0 '||dgsfile;
  78.   exit 0;
  79. end
  80.